import { Request, Response } from 'express';

const getRoleList = (req: Request, res: Response) => {
    res.json({
        "data":[
            {
                "canDelete":false,
                "code":null,
                "gmtCreate":1650334051000,
                "gmtModified":1658737340000,
                "id":6,
                "name":"系统管理",
                "permList":[
                    {
                        "childList":null,
                        "code":"OA_DAM_QUERY",
                        "name":"查看",
                        "parent":"OA_DIFFERENT_APPLY_MANAGER",
                        "type":1
                    },
                    {
                        "childList":null,
                        "code":"OA_DAM_QUERY_LOG",
                        "name":"查看操作记录",
                        "parent":"OA_DIFFERENT_APPLY_MANAGER",
                        "type":1
                    },
                    {
                        "childList":null,
                        "code":"OA_GM_QUERY",
                        "name":"查看",
                        "parent":"OA_GUARANTEE_MANAGER",
                        "type":1
                    },
                    {
                        "childList":null,
                        "code":"OA_GM_CHECK",
                        "name":"保证金审核",
                        "parent":"OA_GUARANTEE_MANAGER",
                        "type":1
                    },
                    {
                        "childList":null,
                        "code":"OA_PROJECT_MANAGER",
                        "name":"项目备案管理",
                        "parent":null,
                        "type":1
                    },
                    {
                        "childList":null,
                        "code":"OA_SM_ROLE",
                        "name":"角色管理",
                        "parent":"OA_SYSTEM_MANAGER",
                        "type":1
                    },
                    {
                        "childList":null,
                        "code":"OA_SM_DEPARTMENT",
                        "name":"部门管理",
                        "parent":"OA_SYSTEM_MANAGER",
                        "type":1
                    },
                    {
                        "childList":null,
                        "code":"OA_DAM_CHECK",
                        "name":"审核",
                        "parent":"OA_DIFFERENT_APPLY_MANAGER",
                        "type":1
                    },
                    {
                        "childList":null,
                        "code":"OA_DAM_PUBLICITY",
                        "name":"公示申请",
                        "parent":"OA_DIFFERENT_APPLY_MANAGER",
                        "type":1
                    },
                    {
                        "childList":null,
                        "code":"OA_DAM_APPROVED",
                        "name":"核定申请",
                        "parent":"OA_DIFFERENT_APPLY_MANAGER",
                        "type":1
                    },
                    {
                        "childList":null,
                        "code":"OA_DAM_QUERY_APPROVED",
                        "name":"查看核定单",
                        "parent":"OA_DIFFERENT_APPLY_MANAGER",
                        "type":1
                    },
                    {
                        "childList":null,
                        "code":"OA_GM_WARNING",
                        "name":"保证金预警通知",
                        "parent":"OA_GUARANTEE_MANAGER",
                        "type":1
                    },
                    {
                        "childList":null,
                        "code":"OA_GM_PROVE",
                        "name":"保证金证明申请",
                        "parent":"OA_GUARANTEE_MANAGER",
                        "type":1
                    },
                    {
                        "childList":null,
                        "code":"OA_GM_EXPORT_EXCEL",
                        "name":"导出",
                        "parent":"OA_GUARANTEE_MANAGER",
                        "type":1
                    },
                    {
                        "childList":null,
                        "code":"OA_AC_QUERY",
                        "name":"查看",
                        "parent":"OA_ACCOUNT_CANCEL_MANAGER",
                        "type":1
                    },
                    {
                        "childList":null,
                        "code":"OA_AC_CHECK",
                        "name":"销户审核",
                        "parent":"OA_ACCOUNT_CANCEL_MANAGER",
                        "type":1
                    },
                    {
                        "childList":null,
                        "code":"OA_AC_MANAGER_APPROVAL",
                        "name":"销户管理-销户审批",
                        "parent":"OA_ACCOUNT_CANCEL_MANAGER",
                        "type":1
                    },
                    {
                        "childList":null,
                        "code":"OA_SAS_QUERY",
                        "name":"查看",
                        "parent":"OA_SPECIAL_ACCOUNT_SALARY_MANAGER",
                        "type":1
                    },
                    {
                        "childList":null,
                        "code":"OA_SAS_CHECK",
                        "name":"审核发放",
                        "parent":"OA_SPECIAL_ACCOUNT_SALARY_MANAGER",
                        "type":1
                    },
                    {
                        "childList":null,
                        "code":"OA_SAS_ATTENDANCE",
                        "name":"考勤详情",
                        "parent":"OA_SPECIAL_ACCOUNT_SALARY_MANAGER",
                        "type":1
                    },
                    {
                        "childList":null,
                        "code":"OA_SAS_DETAIL",
                        "name":"工资明细",
                        "parent":"OA_SPECIAL_ACCOUNT_SALARY_MANAGER",
                        "type":1
                    },
                    {
                        "childList":null,
                        "code":"OA_SAS_PUBLICITY",
                        "name":"工资公示证明申请",
                        "parent":"OA_SPECIAL_ACCOUNT_SALARY_MANAGER",
                        "type":1
                    },
                    {
                        "childList":null,
                        "code":"OA_SAS_PUBLICITY_LOOK",
                        "name":"查看公示证明",
                        "parent":"OA_SPECIAL_ACCOUNT_SALARY_MANAGER",
                        "type":1
                    },
                    {
                        "childList":null,
                        "code":"OA_SAM_ATTENDANCE",
                        "name":"考勤管理",
                        "parent":"OA_SPECIAL_ACCOUNT_MANAGER",
                        "type":1
                    },
                    {
                        "childList":null,
                        "code":"OA_SAM_SALARY",
                        "name":"工资管理",
                        "parent":"OA_SPECIAL_ACCOUNT_MANAGER",
                        "type":1
                    },
                    {
                        "childList":null,
                        "code":"OA_SAM_WARNING",
                        "name":"预警通知",
                        "parent":"OA_SPECIAL_ACCOUNT_MANAGER",
                        "type":1
                    },
                    {
                        "childList":null,
                        "code":"OA_AM_PUBLICITY",
                        "name":"差异化公示审批",
                        "parent":"OA_APPROVAL_MANAGE",
                        "type":1
                    },
                    {
                        "childList":null,
                        "code":"OA_AM_PUBLICITY2",
                        "name":"差异化公示复核审批",
                        "parent":"OA_APPROVAL_MANAGE",
                        "type":1
                    },
                    {
                        "childList":null,
                        "code":"OA_AM_APPROVED",
                        "name":"差异化核定审批",
                        "parent":"OA_APPROVAL_MANAGE",
                        "type":1
                    },
                    {
                        "childList":null,
                        "code":"OA_AM_GUARANTEE",
                        "name":"缴纳证明审批",
                        "parent":"OA_APPROVAL_MANAGE",
                        "type":1
                    },
                    {
                        "childList":null,
                        "code":"OA_AM_SALARY",
                        "name":"工资公示证明审批",
                        "parent":"OA_APPROVAL_MANAGE",
                        "type":1
                    },
                    {
                        "childList":null,
                        "code":"OA_GM_CHECK_GUARANTEE",
                        "name":"保函审核",
                        "parent":"OA_GUARANTEE_MANAGER",
                        "type":1
                    },
                    {
                        "childList":null,
                        "code":"OA_GM_CHECK_CHANGE",
                        "name":"保证金变更保函审批",
                        "parent":"OA_GUARANTEE_MANAGER",
                        "type":1
                    },
                    {
                        "childList":null,
                        "code":"OA_GM_URGE",
                        "name":"催一下",
                        "parent":"OA_GUARANTEE_MANAGER",
                        "type":1
                    },
                    {
                        "childList":null,
                        "code":"OA_GM_CANCEL_FILE",
                        "name":"查看销户通知书",
                        "parent":"OA_GUARANTEE_MANAGER",
                        "type":1
                    },
                    {
                        "childList":null,
                        "code":"OA_GM_PAY_RECORD",
                        "name":"查看缴纳证明",
                        "parent":"OA_GUARANTEE_MANAGER",
                        "type":1
                    },
                    {
                        "childList":null,
                        "code":"OA_GM_CHECK_RECORD",
                        "name":"查看审核记录",
                        "parent":"OA_GUARANTEE_MANAGER",
                        "type":1
                    },
                    {
                        "childList":null,
                        "code":"OA_GM_APPROVED",
                        "name":"查看核定单",
                        "parent":"OA_GUARANTEE_MANAGER",
                        "type":1
                    },
                    {
                        "childList":null,
                        "code":"OA_SAM_QUERY",
                        "name":"查看",
                        "parent":"OA_SPECIAL_ACCOUNT_MANAGER",
                        "type":1
                    }
                ],
                "perms":"OA_DAM_QUERY,OA_DAM_QUERY_LOG,OA_GM_QUERY,OA_GM_CHECK,OA_PROJECT_MANAGER,OA_SM_ROLE,OA_SM_DEPARTMENT,OA_DAM_CHECK,OA_DAM_PUBLICITY,OA_DAM_APPROVED,OA_DAM_QUERY_APPROVED,OA_GM_WARNING,OA_GM_PROVE,OA_GM_EXPORT_EXCEL,OA_AC_QUERY,OA_AC_CHECK,OA_AC_MANAGER_APPROVAL,OA_SAS_QUERY,OA_SAS_CHECK,OA_SAS_ATTENDANCE,OA_SAS_DETAIL,OA_SAS_PUBLICITY,OA_SAS_PUBLICITY_LOOK,OA_SAM_ATTENDANCE,OA_SAM_SALARY,OA_SAM_WARNING,OA_AM_PUBLICITY,OA_AM_PUBLICITY2,OA_AM_APPROVED,OA_AM_GUARANTEE,OA_AM_SALARY,OA_GM_CHECK_GUARANTEE,OA_GM_CHECK_CHANGE,OA_GM_URGE,OA_GM_CANCEL_FILE,OA_GM_PAY_RECORD,OA_GM_CHECK_RECORD,OA_GM_APPROVED,OA_SAM_QUERY,OA_SALARY_SEARCH_MANAGE,OA_SALARY_SEARCH_MANAGE_QUERY",
                "status":1,
                "targetId":0,
                "type":1
            },
            {
                "canDelete":true,
                "code":null,
                "gmtCreate":1650336543000,
                "gmtModified":1650533950000,
                "id":8,
                "name":"wm编辑角色",
                "permList":[
                    {
                        "childList":null,
                        "code":"OA_SYSTEM_MANAGER",
                        "name":"系统管理",
                        "parent":null,
                        "type":1
                    },
                    {
                        "childList":null,
                        "code":"OA_PROJECT_MANAGER",
                        "name":"项目备案管理",
                        "parent":null,
                        "type":1
                    },
                    {
                        "childList":null,
                        "code":"OA_DIFFERENT_APPLY_MANAGER",
                        "name":"差异化管理",
                        "parent":null,
                        "type":1
                    },
                    {
                        "childList":null,
                        "code":"OA_GUARANTEE_MANAGER",
                        "name":"保证金缴纳管理",
                        "parent":null,
                        "type":1
                    },
                    {
                        "childList":null,
                        "code":"OA_ACCOUNT_CANCEL_MANAGER",
                        "name":"销户管理",
                        "parent":null,
                        "type":1
                    }
                ],
                "perms":"OA_SYSTEM_MANAGER,OA_PROJECT_MANAGER,OA_DIFFERENT_APPLY_MANAGER,OA_GUARANTEE_MANAGER,OA_ACCOUNT_CANCEL_MANAGER",
                "status":1,
                "targetId":0,
                "type":1
            },
            {
                "canDelete":true,
                "code":null,
                "gmtCreate":1650533616000,
                "gmtModified":1656488723000,
                "id":20,
                "name":"差异化申请管理模块",
                "permList":[
                    {
                        "childList":null,
                        "code":"OA_DIFFERENT_APPLY_MANAGER",
                        "name":"差异化管理",
                        "parent":null,
                        "type":1
                    }
                ],
                "perms":"OA_DIFFERENT_APPLY_MANAGER,OA_DIFFERENT_APPLY_PUBLICITY_REVIEW",
                "status":1,
                "targetId":0,
                "type":1
            },
            {
                "canDelete":true,
                "code":null,
                "gmtCreate":1650533632000,
                "gmtModified":1650533632000,
                "id":21,
                "name":"销户管理模块",
                "permList":[
                    {
                        "childList":null,
                        "code":"OA_ACCOUNT_CANCEL_MANAGER",
                        "name":"销户管理",
                        "parent":null,
                        "type":1
                    }
                ],
                "perms":"OA_ACCOUNT_CANCEL_MANAGER",
                "status":1,
                "targetId":0,
                "type":1
            },
            {
                "canDelete":true,
                "code":null,
                "gmtCreate":1650534883000,
                "gmtModified":1650534883000,
                "id":23,
                "name":"系统管理模块",
                "permList":null,
                "perms":null,
                "status":1,
                "targetId":0,
                "type":1
            },
            {
                "canDelete":true,
                "code":null,
                "gmtCreate":1657896018000,
                "gmtModified":1657896018000,
                "id":24,
                "name":"分支机构-差异化",
                "permList":[
                    {
                        "childList":null,
                        "code":"OA_DIFFERENT_APPLY_MANAGER",
                        "name":"差异化管理",
                        "parent":null,
                        "type":1
                    }
                ],
                "perms":"OA_DIFFERENT_APPLY_MANAGER",
                "status":1,
                "targetId":0,
                "type":1
            },
            {
                "canDelete":true,
                "code":null,
                "gmtCreate":1658312560000,
                "gmtModified":1658478619000,
                "id":25,
                "name":"分支机构审批管理",
                "permList":[
                    {
                        "childList":null,
                        "code":"OA_APPROVAL_MANAGE",
                        "name":"审批管理",
                        "parent":null,
                        "type":1
                    }
                ],
                "perms":"OA_APPROVAL_MANAGE,OA_BRANCH_APPROVAL_MANAGE",
                "status":1,
                "targetId":0,
                "type":1
            }
        ],
        "errCode":0,
        "errMsg":null,
        "extend":null,
        "log":null,
        "redirectUrl":null,
        "success":true,
        "total":0
    });
};

const successRequest = (req: Request, res: Response) => {
    res.json({
        "success": true,
        "errCode": 0,
        "errMsg": null,
        "total": 0,
        "redirectUrl": null,
        "extend": null
    });
}

const tagPerms = (req: Request, res: Response) => {
    res.json({
        "data":[
            {
                "childList":[
    
                ],
                "code":"OA_PROJECT_MANAGER",
                "name":"项目备案管理",
                "parent":null,
                "type":1
            },
            {
                "childList":[
                    {
                        "childList":[
    
                        ],
                        "code":"OA_SM_ROLE",
                        "name":"角色管理",
                        "parent":"OA_SYSTEM_MANAGER",
                        "type":1
                    },
                    {
                        "childList":[
    
                        ],
                        "code":"OA_SM_DEPARTMENT",
                        "name":"部门管理",
                        "parent":"OA_SYSTEM_MANAGER",
                        "type":1
                    }
                ],
                "code":"OA_SYSTEM_MANAGER",
                "name":"系统管理",
                "parent":null,
                "type":1
            },
            {
                "childList":[
                    {
                        "childList":[
    
                        ],
                        "code":"OA_DAM_QUERY",
                        "name":"查看",
                        "parent":"OA_DIFFERENT_APPLY_MANAGER",
                        "type":1
                    },
                    {
                        "childList":[
    
                        ],
                        "code":"OA_DAM_CHECK",
                        "name":"审核",
                        "parent":"OA_DIFFERENT_APPLY_MANAGER",
                        "type":1
                    },
                    {
                        "childList":[
    
                        ],
                        "code":"OA_DAM_PUBLICITY",
                        "name":"公示申请",
                        "parent":"OA_DIFFERENT_APPLY_MANAGER",
                        "type":1
                    },
                    {
                        "childList":[
    
                        ],
                        "code":"OA_DAM_APPROVED",
                        "name":"核定申请",
                        "parent":"OA_DIFFERENT_APPLY_MANAGER",
                        "type":1
                    },
                    {
                        "childList":[
    
                        ],
                        "code":"OA_DAM_QUERY_APPROVED",
                        "name":"查看核定单",
                        "parent":"OA_DIFFERENT_APPLY_MANAGER",
                        "type":1
                    },
                    {
                        "childList":[
    
                        ],
                        "code":"OA_DAM_QUERY_LOG",
                        "name":"查看操作记录",
                        "parent":"OA_DIFFERENT_APPLY_MANAGER",
                        "type":1
                    }
                ],
                "code":"OA_DIFFERENT_APPLY_MANAGER",
                "name":"差异化管理",
                "parent":null,
                "type":1
            },
            {
                "childList":[
                    {
                        "childList":[
    
                        ],
                        "code":"OA_GM_QUERY",
                        "name":"查看",
                        "parent":"OA_GUARANTEE_MANAGER",
                        "type":1
                    },
                    {
                        "childList":[
    
                        ],
                        "code":"OA_GM_CHECK",
                        "name":"保证金审核",
                        "parent":"OA_GUARANTEE_MANAGER",
                        "type":1
                    },
                    {
                        "childList":[
    
                        ],
                        "code":"OA_GM_CHECK_GUARANTEE",
                        "name":"保函审核",
                        "parent":"OA_GUARANTEE_MANAGER",
                        "type":1
                    },
                    {
                        "childList":[
    
                        ],
                        "code":"OA_GM_CHECK_CHANGE",
                        "name":"保证金变更保函审批",
                        "parent":"OA_GUARANTEE_MANAGER",
                        "type":1
                    },
                    {
                        "childList":[
    
                        ],
                        "code":"OA_GM_WARNING",
                        "name":"保证金预警通知",
                        "parent":"OA_GUARANTEE_MANAGER",
                        "type":1
                    },
                    {
                        "childList":[
    
                        ],
                        "code":"OA_GM_URGE",
                        "name":"催一下",
                        "parent":"OA_GUARANTEE_MANAGER",
                        "type":1
                    },
                    {
                        "childList":[
    
                        ],
                        "code":"OA_GM_PROVE",
                        "name":"保证金证明申请",
                        "parent":"OA_GUARANTEE_MANAGER",
                        "type":1
                    },
                    {
                        "childList":[
    
                        ],
                        "code":"OA_GM_EXPORT_EXCEL",
                        "name":"导出",
                        "parent":"OA_GUARANTEE_MANAGER",
                        "type":1
                    },
                    {
                        "childList":[
    
                        ],
                        "code":"OA_GM_CANCEL_FILE",
                        "name":"查看销户通知书",
                        "parent":"OA_GUARANTEE_MANAGER",
                        "type":1
                    },
                    {
                        "childList":[
    
                        ],
                        "code":"OA_GM_PAY_RECORD",
                        "name":"查看缴纳证明",
                        "parent":"OA_GUARANTEE_MANAGER",
                        "type":1
                    },
                    {
                        "childList":[
    
                        ],
                        "code":"OA_GM_CHECK_RECORD",
                        "name":"查看审核记录",
                        "parent":"OA_GUARANTEE_MANAGER",
                        "type":1
                    },
                    {
                        "childList":[
    
                        ],
                        "code":"OA_GM_APPROVED",
                        "name":"查看核定单",
                        "parent":"OA_GUARANTEE_MANAGER",
                        "type":1
                    }
                ],
                "code":"OA_GUARANTEE_MANAGER",
                "name":"保证金缴纳管理",
                "parent":null,
                "type":1
            },
            {
                "childList":[
                    {
                        "childList":[
    
                        ],
                        "code":"OA_AC_QUERY",
                        "name":"查看",
                        "parent":"OA_ACCOUNT_CANCEL_MANAGER",
                        "type":1
                    },
                    {
                        "childList":[
    
                        ],
                        "code":"OA_AC_CHECK",
                        "name":"销户审核",
                        "parent":"OA_ACCOUNT_CANCEL_MANAGER",
                        "type":1
                    },
                    {
                        "childList":[
    
                        ],
                        "code":"OA_AC_MANAGER_APPROVAL",
                        "name":"销户管理-销户审批",
                        "parent":"OA_ACCOUNT_CANCEL_MANAGER",
                        "type":1
                    }
                ],
                "code":"OA_ACCOUNT_CANCEL_MANAGER",
                "name":"销户管理",
                "parent":null,
                "type":1
            },
            {
                "childList":[
                    {
                        "childList":[
    
                        ],
                        "code":"OA_SAM_QUERY",
                        "name":"查看",
                        "parent":"OA_SPECIAL_ACCOUNT_MANAGER",
                        "type":1
                    },
                    {
                        "childList":[
    
                        ],
                        "code":"OA_SAM_ATTENDANCE",
                        "name":"考勤管理",
                        "parent":"OA_SPECIAL_ACCOUNT_MANAGER",
                        "type":1
                    },
                    {
                        "childList":[
    
                        ],
                        "code":"OA_SAM_SALARY",
                        "name":"工资管理",
                        "parent":"OA_SPECIAL_ACCOUNT_MANAGER",
                        "type":1
                    },
                    {
                        "childList":[
    
                        ],
                        "code":"OA_SAM_WARNING",
                        "name":"预警通知",
                        "parent":"OA_SPECIAL_ACCOUNT_MANAGER",
                        "type":1
                    }
                ],
                "code":"OA_SPECIAL_ACCOUNT_MANAGER",
                "name":"农民工工资专户管理",
                "parent":null,
                "type":1
            },
            {
                "childList":[
                    {
                        "childList":[
    
                        ],
                        "code":"OA_SAS_QUERY",
                        "name":"查看",
                        "parent":"OA_SPECIAL_ACCOUNT_SALARY_MANAGER",
                        "type":1
                    },
                    {
                        "childList":[
    
                        ],
                        "code":"OA_SAS_CHECK",
                        "name":"审核发放",
                        "parent":"OA_SPECIAL_ACCOUNT_SALARY_MANAGER",
                        "type":1
                    },
                    {
                        "childList":[
    
                        ],
                        "code":"OA_SAS_ATTENDANCE",
                        "name":"考勤详情",
                        "parent":"OA_SPECIAL_ACCOUNT_SALARY_MANAGER",
                        "type":1
                    },
                    {
                        "childList":[
    
                        ],
                        "code":"OA_SAS_DETAIL",
                        "name":"工资明细",
                        "parent":"OA_SPECIAL_ACCOUNT_SALARY_MANAGER",
                        "type":1
                    },
                    {
                        "childList":[
    
                        ],
                        "code":"OA_SAS_PUBLICITY",
                        "name":"工资公示证明申请",
                        "parent":"OA_SPECIAL_ACCOUNT_SALARY_MANAGER",
                        "type":1
                    },
                    {
                        "childList":[
    
                        ],
                        "code":"OA_SAS_PUBLICITY_LOOK",
                        "name":"查看公示证明",
                        "parent":"OA_SPECIAL_ACCOUNT_SALARY_MANAGER",
                        "type":1
                    }
                ],
                "code":"OA_SPECIAL_ACCOUNT_SALARY_MANAGER",
                "name":"工资发放管理",
                "parent":null,
                "type":1
            },
            {
                "childList":[
                    {
                        "childList":[
    
                        ],
                        "code":"OA_AM_PUBLICITY",
                        "name":"差异化公示审批",
                        "parent":"OA_APPROVAL_MANAGE",
                        "type":1
                    },
                    {
                        "childList":[
    
                        ],
                        "code":"OA_AM_PUBLICITY2",
                        "name":"差异化公示复核审批",
                        "parent":"OA_APPROVAL_MANAGE",
                        "type":1
                    },
                    {
                        "childList":[
    
                        ],
                        "code":"OA_AM_APPROVED",
                        "name":"差异化核定审批",
                        "parent":"OA_APPROVAL_MANAGE",
                        "type":1
                    },
                    {
                        "childList":[
    
                        ],
                        "code":"OA_AM_GUARANTEE",
                        "name":"缴纳证明审批",
                        "parent":"OA_APPROVAL_MANAGE",
                        "type":1
                    },
                    {
                        "childList":[
    
                        ],
                        "code":"OA_AM_SALARY",
                        "name":"工资公示证明审批",
                        "parent":"OA_APPROVAL_MANAGE",
                        "type":1
                    }
                ],
                "code":"OA_APPROVAL_MANAGE",
                "name":"审批管理",
                "parent":null,
                "type":1
            }
        ],
        "errCode":0,
        "errMsg":null,
        "extend":null,
        "log":null,
        "redirectUrl":null,
        "success":true,
        "total":0
    });
}

const searchUser = (req: Request, res: Response) => {
    res.json({
        "data":[
            {
                "addTags":null,
                "authority":"|20|6|25|",
                "authorityType":1,
                "certNo":null,
                "deleted":false,
                "departmentId":2,
                "gmtCreate":1650007161000,
                "gmtModified":1658478636000,
                "id":18,
                "name":"李猛",
                "perms":null,
                "removeTags":null,
                "userId":23,
                "userMobile":"13261170195"
            },
            {
                "addTags":null,
                "authority":"|6|",
                "authorityType":1,
                "certNo":null,
                "deleted":false,
                "departmentId":5,
                "gmtCreate":1657265886000,
                "gmtModified":1657690686000,
                "id":26,
                "name":"未名",
                "perms":null,
                "removeTags":null,
                "userId":55,
                "userMobile":"18668016895"
            },
            {
                "addTags":null,
                "authority":"|6|",
                "authorityType":1,
                "certNo":null,
                "deleted":false,
                "departmentId":5,
                "gmtCreate":1657534261000,
                "gmtModified":1657534510000,
                "id":27,
                "name":"田志卿",
                "perms":null,
                "removeTags":null,
                "userId":71,
                "userMobile":"15157124091"
            },
            {
                "addTags":null,
                "authority":"|6|",
                "authorityType":1,
                "certNo":null,
                "deleted":false,
                "departmentId":5,
                "gmtCreate":1657606416000,
                "gmtModified":1657606436000,
                "id":33,
                "name":"MJ劳监账号",
                "perms":null,
                "removeTags":null,
                "userId":73,
                "userMobile":"18258465350"
            },
            {
                "addTags":null,
                "authority":"|6|",
                "authorityType":1,
                "certNo":null,
                "deleted":false,
                "departmentId":3,
                "gmtCreate":1659088419000,
                "gmtModified":1659088447000,
                "id":49,
                "name":"信州测试",
                "perms":null,
                "removeTags":null,
                "userId":97,
                "userMobile":"18355551986"
            },
            {
                "addTags":null,
                "authority":"|6|",
                "authorityType":1,
                "certNo":"",
                "deleted":false,
                "departmentId":344,
                "gmtCreate":1661764529000,
                "gmtModified":1661940238000,
                "id":51,
                "name":"李猛",
                "perms":null,
                "removeTags":null,
                "userId":23,
                "userMobile":"13261170195"
            },
            {
                "addTags":null,
                "authority":"|6|",
                "authorityType":1,
                "certNo":"",
                "deleted":false,
                "departmentId":344,
                "gmtCreate":1661913474000,
                "gmtModified":1662367131000,
                "id":52,
                "name":"gmy1",
                "perms":null,
                "removeTags":null,
                "userId":42,
                "userMobile":"15757180010"
            },
            {
                "addTags":null,
                "authority":"|6|",
                "authorityType":1,
                "certNo":"",
                "deleted":false,
                "departmentId":297,
                "gmtCreate":1661915618000,
                "gmtModified":1661927995000,
                "id":56,
                "name":"gmy2",
                "perms":null,
                "removeTags":null,
                "userId":43,
                "userMobile":"15757180011"
            },
            {
                "addTags":null,
                "authority":"|6|",
                "authorityType":1,
                "certNo":"",
                "deleted":false,
                "departmentId":345,
                "gmtCreate":1661929915000,
                "gmtModified":1661930514000,
                "id":60,
                "name":"gmy18",
                "perms":null,
                "removeTags":null,
                "userId":100,
                "userMobile":"15757180018"
            },
            {
                "addTags":null,
                "authority":"|6|",
                "authorityType":1,
                "certNo":"",
                "deleted":false,
                "departmentId":346,
                "gmtCreate":1661929995000,
                "gmtModified":1661930514000,
                "id":61,
                "name":"gmy19",
                "perms":null,
                "removeTags":null,
                "userId":101,
                "userMobile":"15757180019"
            },
            {
                "addTags":null,
                "authority":"|6|",
                "authorityType":1,
                "certNo":"",
                "deleted":false,
                "departmentId":347,
                "gmtCreate":1661930187000,
                "gmtModified":1661930514000,
                "id":63,
                "name":"gmy20",
                "perms":null,
                "removeTags":null,
                "userId":102,
                "userMobile":"15757181010"
            },
            {
                "addTags":null,
                "authority":"|6|",
                "authorityType":1,
                "certNo":"",
                "deleted":false,
                "departmentId":3,
                "gmtCreate":1661930594000,
                "gmtModified":1661930653000,
                "id":64,
                "name":"gmy21",
                "perms":null,
                "removeTags":null,
                "userId":103,
                "userMobile":"15757181011"
            },
            {
                "addTags":null,
                "authority":"|6|",
                "authorityType":1,
                "certNo":"",
                "deleted":false,
                "departmentId":347,
                "gmtCreate":1661931220000,
                "gmtModified":1661932140000,
                "id":65,
                "name":"gmy22",
                "perms":null,
                "removeTags":null,
                "userId":104,
                "userMobile":"15757181012"
            },
            {
                "addTags":null,
                "authority":"|6|",
                "authorityType":1,
                "certNo":"",
                "deleted":false,
                "departmentId":3,
                "gmtCreate":1661931975000,
                "gmtModified":1661932140000,
                "id":66,
                "name":"gmy22",
                "perms":null,
                "removeTags":null,
                "userId":104,
                "userMobile":"15757181012"
            },
            {
                "addTags":null,
                "authority":"|6|",
                "authorityType":1,
                "certNo":"",
                "deleted":false,
                "departmentId":295,
                "gmtCreate":1661934938000,
                "gmtModified":1661935001000,
                "id":67,
                "name":"gmy23",
                "perms":null,
                "removeTags":null,
                "userId":105,
                "userMobile":"15757181013"
            },
            {
                "addTags":null,
                "authority":"|6|",
                "authorityType":1,
                "certNo":"",
                "deleted":false,
                "departmentId":344,
                "gmtCreate":1662087200000,
                "gmtModified":1662087402000,
                "id":68,
                "name":"gmy24",
                "perms":null,
                "removeTags":null,
                "userId":113,
                "userMobile":"15757181014"
            },
            {
                "addTags":null,
                "authority":"|6|",
                "authorityType":1,
                "certNo":"",
                "deleted":false,
                "departmentId":297,
                "gmtCreate":1662087311000,
                "gmtModified":1662087402000,
                "id":69,
                "name":"gmy24",
                "perms":null,
                "removeTags":null,
                "userId":113,
                "userMobile":"15757181014"
            },
            {
                "addTags":null,
                "authority":"|6|",
                "authorityType":1,
                "certNo":"",
                "deleted":false,
                "departmentId":347,
                "gmtCreate":1663574804000,
                "gmtModified":1663574837000,
                "id":72,
                "name":"杨国星",
                "perms":null,
                "removeTags":null,
                "userId":27,
                "userMobile":"15158072033"
            }
        ],
        "errCode":0,
        "errMsg":null,
        "extend":null,
        "redirectUrl":null,
        "success":true,
        "total":0
    });
};


const searchDepartment = (req: Request, res: Response) => {
    if (req.query.id == 1) {
        res.json({
            "data": [
                {
                    "children": [
                        {
                            "id": 2,
                            "name": "技术部",
                            "departmentUser": null,
                            "parentId": 1
                        },
                        {
                            "id": 3,
                            "name": "董事会",
                            "departmentUser": null,
                            "parentId": 1
                        }
                    ],
                    "id": 1,
                    "departmentUser": [
                        {
                            "addTags": null,
                            "deleted": null,
                            "gmtCreate": null,
                            "gmtModified": null,
                            "id": 123,
                            "removeTags": null,
                            "role": null,
                            "type": null,
                            "userId": 1,
                            "userName": 'wm'
                        },
                        {
                            "addTags": null,
                            "deleted": null,
                            "gmtCreate": null,
                            "gmtModified": null,
                            "id": 12334,
                            "removeTags": null,
                            "role": null,
                            "type": null,
                            "userId": 1,
                            "userName": 'wm测试',
                            "userMobile": '18841294121'
                        },

                    ],
                    "name": "交易中心",
                    "parentId": 0
                }
            ],
            "errCode": 0,
            "success": true,
            "total": 0
        });
        return
    }
    res.json({
        "data":[
            {
                "id":1,
                "parentId":0,
                "name":"上饶市根治拖欠农民工工资工作领导小组",
                "contactsUser":null,
                "contactsPhone":null,
                "children":[
                    {
                        "id":6,
                        "parentId":1,
                        "name":"上饶市人社执法支队",
                        "contactsUser":"监察总队",
                        "contactsPhone":"19923456789",
                        "children":[
                            {
                                "id":344,
                                "parentId":6,
                                "name":"上饶市劳动监察局",
                                "contactsUser":null,
                                "contactsPhone":null
                            },
                            {
                                "id":345,
                                "parentId":6,
                                "name":"上饶市住建局",
                                "contactsUser":null,
                                "contactsPhone":null
                            },
                            {
                                "id":346,
                                "parentId":6,
                                "name":"上饶市水利局",
                                "contactsUser":null,
                                "contactsPhone":null
                            },
                            {
                                "id":347,
                                "parentId":6,
                                "name":"上饶市交通局",
                                "contactsUser":null,
                                "contactsPhone":null
                            }
                        ]
                    },
                    {
                        "id":7,
                        "parentId":1,
                        "name":"县市(区)根治办",
                        "contactsUser":null,
                        "contactsPhone":null,
                        "children":[
                            {
                                "id":214,
                                "parentId":7,
                                "name":"信州区根治办",
                                "contactsUser":null,
                                "contactsPhone":null,
                                "children":[
                                    {
                                        "id":3,
                                        "parentId":214,
                                        "name":"信州区劳动监察局",
                                        "contactsUser":null,
                                        "contactsPhone":null
                                    },
                                    {
                                        "id":295,
                                        "parentId":214,
                                        "name":"信州区住建局",
                                        "contactsUser":null,
                                        "contactsPhone":null
                                    },
                                    {
                                        "id":296,
                                        "parentId":214,
                                        "name":"信州区水利局",
                                        "contactsUser":null,
                                        "contactsPhone":null
                                    },
                                    {
                                        "id":297,
                                        "parentId":214,
                                        "name":"信州区交通局",
                                        "contactsUser":null,
                                        "contactsPhone":null
                                    }
                                ]
                            },
                            {
                                "id":215,
                                "parentId":7,
                                "name":"广丰区根治办",
                                "contactsUser":null,
                                "contactsPhone":null,
                                "children":[
                                    {
                                        "id":4,
                                        "parentId":215,
                                        "name":"广丰区劳动监察局",
                                        "contactsUser":null,
                                        "contactsPhone":null
                                    },
                                    {
                                        "id":299,
                                        "parentId":215,
                                        "name":"广丰区住建局",
                                        "contactsUser":null,
                                        "contactsPhone":null
                                    },
                                    {
                                        "id":300,
                                        "parentId":215,
                                        "name":"广丰区水利局",
                                        "contactsUser":null,
                                        "contactsPhone":null
                                    },
                                    {
                                        "id":301,
                                        "parentId":215,
                                        "name":"广丰区交通局",
                                        "contactsUser":null,
                                        "contactsPhone":null
                                    }
                                ]
                            },
                            {
                                "id":216,
                                "parentId":7,
                                "name":"广信区根治办",
                                "contactsUser":null,
                                "contactsPhone":null,
                                "children":[
                                    {
                                        "id":5,
                                        "parentId":216,
                                        "name":"广信区劳动监察局",
                                        "contactsUser":"张三",
                                        "contactsPhone":"18211112222"
                                    },
                                    {
                                        "id":302,
                                        "parentId":216,
                                        "name":"广信区住建局",
                                        "contactsUser":null,
                                        "contactsPhone":null
                                    },
                                    {
                                        "id":303,
                                        "parentId":216,
                                        "name":"广信区水利局",
                                        "contactsUser":null,
                                        "contactsPhone":null
                                    },
                                    {
                                        "id":304,
                                        "parentId":216,
                                        "name":"广信区交通局",
                                        "contactsUser":null,
                                        "contactsPhone":null
                                    }
                                ]
                            },
                            {
                                "id":217,
                                "parentId":7,
                                "name":"玉山县根治办",
                                "contactsUser":null,
                                "contactsPhone":null,
                                "children":[
                                    {
                                        "id":8,
                                        "parentId":217,
                                        "name":"玉山县劳动监察局",
                                        "contactsUser":"张三啊",
                                        "contactsPhone":"18355556666"
                                    },
                                    {
                                        "id":305,
                                        "parentId":217,
                                        "name":"玉山县住建局",
                                        "contactsUser":null,
                                        "contactsPhone":null
                                    },
                                    {
                                        "id":306,
                                        "parentId":217,
                                        "name":"玉山县水利局",
                                        "contactsUser":null,
                                        "contactsPhone":null
                                    },
                                    {
                                        "id":307,
                                        "parentId":217,
                                        "name":"玉山县交通局",
                                        "contactsUser":null,
                                        "contactsPhone":null
                                    }
                                ]
                            },
                            {
                                "id":218,
                                "parentId":7,
                                "name":"铅山县根治办",
                                "contactsUser":null,
                                "contactsPhone":null,
                                "children":[
                                    {
                                        "id":9,
                                        "parentId":218,
                                        "name":"铅山县劳动监察局",
                                        "contactsUser":null,
                                        "contactsPhone":null
                                    },
                                    {
                                        "id":308,
                                        "parentId":218,
                                        "name":"铅山县住建局",
                                        "contactsUser":null,
                                        "contactsPhone":null
                                    },
                                    {
                                        "id":309,
                                        "parentId":218,
                                        "name":"铅山县水利局",
                                        "contactsUser":null,
                                        "contactsPhone":null
                                    },
                                    {
                                        "id":310,
                                        "parentId":218,
                                        "name":"铅山县交通局",
                                        "contactsUser":null,
                                        "contactsPhone":null
                                    }
                                ]
                            },
                            {
                                "id":219,
                                "parentId":7,
                                "name":"横峰县根治办",
                                "contactsUser":null,
                                "contactsPhone":null,
                                "children":[
                                    {
                                        "id":10,
                                        "parentId":219,
                                        "name":"横峰县劳动监察局",
                                        "contactsUser":null,
                                        "contactsPhone":null
                                    },
                                    {
                                        "id":311,
                                        "parentId":219,
                                        "name":"横峰县住建局",
                                        "contactsUser":null,
                                        "contactsPhone":null
                                    },
                                    {
                                        "id":312,
                                        "parentId":219,
                                        "name":"横峰县水利局",
                                        "contactsUser":null,
                                        "contactsPhone":null
                                    },
                                    {
                                        "id":313,
                                        "parentId":219,
                                        "name":"横峰县交通局",
                                        "contactsUser":null,
                                        "contactsPhone":null
                                    }
                                ]
                            },
                            {
                                "id":220,
                                "parentId":7,
                                "name":"弋阳县根治办",
                                "contactsUser":null,
                                "contactsPhone":null,
                                "children":[
                                    {
                                        "id":11,
                                        "parentId":220,
                                        "name":"弋阳县劳动监察局",
                                        "contactsUser":null,
                                        "contactsPhone":null
                                    },
                                    {
                                        "id":314,
                                        "parentId":220,
                                        "name":"弋阳县住建局",
                                        "contactsUser":null,
                                        "contactsPhone":null
                                    },
                                    {
                                        "id":315,
                                        "parentId":220,
                                        "name":"弋阳县水利局",
                                        "contactsUser":null,
                                        "contactsPhone":null
                                    },
                                    {
                                        "id":316,
                                        "parentId":220,
                                        "name":"弋阳县交通局",
                                        "contactsUser":null,
                                        "contactsPhone":null
                                    }
                                ]
                            },
                            {
                                "id":221,
                                "parentId":7,
                                "name":"万年县根治办",
                                "contactsUser":null,
                                "contactsPhone":null,
                                "children":[
                                    {
                                        "id":12,
                                        "parentId":221,
                                        "name":"万年县劳动监察局",
                                        "contactsUser":null,
                                        "contactsPhone":null
                                    },
                                    {
                                        "id":317,
                                        "parentId":221,
                                        "name":"万年县住建局",
                                        "contactsUser":null,
                                        "contactsPhone":null
                                    },
                                    {
                                        "id":318,
                                        "parentId":221,
                                        "name":"万年县水利局",
                                        "contactsUser":null,
                                        "contactsPhone":null
                                    },
                                    {
                                        "id":319,
                                        "parentId":221,
                                        "name":"万年县交通局",
                                        "contactsUser":null,
                                        "contactsPhone":null
                                    }
                                ]
                            },
                            {
                                "id":222,
                                "parentId":7,
                                "name":"余干县根治办",
                                "contactsUser":null,
                                "contactsPhone":null,
                                "children":[
                                    {
                                        "id":13,
                                        "parentId":222,
                                        "name":"余干县劳动监察局",
                                        "contactsUser":null,
                                        "contactsPhone":null
                                    },
                                    {
                                        "id":320,
                                        "parentId":222,
                                        "name":"余干县住建局",
                                        "contactsUser":null,
                                        "contactsPhone":null
                                    },
                                    {
                                        "id":321,
                                        "parentId":222,
                                        "name":"余干县水利局",
                                        "contactsUser":null,
                                        "contactsPhone":null
                                    },
                                    {
                                        "id":322,
                                        "parentId":222,
                                        "name":"余干县交通局",
                                        "contactsUser":null,
                                        "contactsPhone":null
                                    }
                                ]
                            },
                            {
                                "id":224,
                                "parentId":7,
                                "name":"婺源县根治办",
                                "contactsUser":null,
                                "contactsPhone":null,
                                "children":[
                                    {
                                        "id":15,
                                        "parentId":224,
                                        "name":"婺源县劳动监察局",
                                        "contactsUser":null,
                                        "contactsPhone":null
                                    },
                                    {
                                        "id":326,
                                        "parentId":224,
                                        "name":"婺源县住建局",
                                        "contactsUser":null,
                                        "contactsPhone":null
                                    },
                                    {
                                        "id":327,
                                        "parentId":224,
                                        "name":"婺源县水利局",
                                        "contactsUser":null,
                                        "contactsPhone":null
                                    },
                                    {
                                        "id":328,
                                        "parentId":224,
                                        "name":"婺源县交通局",
                                        "contactsUser":null,
                                        "contactsPhone":null
                                    }
                                ]
                            },
                            {
                                "id":225,
                                "parentId":7,
                                "name":"德兴市根治办",
                                "contactsUser":null,
                                "contactsPhone":null,
                                "children":[
                                    {
                                        "id":16,
                                        "parentId":225,
                                        "name":"德兴市劳动监察局",
                                        "contactsUser":null,
                                        "contactsPhone":null
                                    },
                                    {
                                        "id":329,
                                        "parentId":225,
                                        "name":"德兴市住建局",
                                        "contactsUser":null,
                                        "contactsPhone":null
                                    },
                                    {
                                        "id":330,
                                        "parentId":225,
                                        "name":"德兴市水利局",
                                        "contactsUser":null,
                                        "contactsPhone":null
                                    },
                                    {
                                        "id":331,
                                        "parentId":225,
                                        "name":"德兴市交通局",
                                        "contactsUser":null,
                                        "contactsPhone":null
                                    }
                                ]
                            },
                            {
                                "id":227,
                                "parentId":7,
                                "name":"三清山风景名胜区根治办",
                                "contactsUser":null,
                                "contactsPhone":null,
                                "children":[
                                    {
                                        "id":18,
                                        "parentId":227,
                                        "name":"三清山风景名胜区社会发展局",
                                        "contactsUser":null,
                                        "contactsPhone":null
                                    },
                                    {
                                        "id":335,
                                        "parentId":227,
                                        "name":"三清山风景名胜区住建局",
                                        "contactsUser":null,
                                        "contactsPhone":null
                                    },
                                    {
                                        "id":336,
                                        "parentId":227,
                                        "name":"三清山风景名胜区水利局",
                                        "contactsUser":null,
                                        "contactsPhone":null
                                    },
                                    {
                                        "id":337,
                                        "parentId":227,
                                        "name":"三清山风景名胜区交通局",
                                        "contactsUser":null,
                                        "contactsPhone":null
                                    }
                                ]
                            },
                            {
                                "id":228,
                                "parentId":7,
                                "name":"经开区根治办",
                                "contactsUser":null,
                                "contactsPhone":null,
                                "children":[
                                    {
                                        "id":19,
                                        "parentId":228,
                                        "name":"经开区劳动监察大队",
                                        "contactsUser":null,
                                        "contactsPhone":null
                                    },
                                    {
                                        "id":338,
                                        "parentId":228,
                                        "name":"经开区住建局",
                                        "contactsUser":null,
                                        "contactsPhone":null
                                    },
                                    {
                                        "id":339,
                                        "parentId":228,
                                        "name":"经开区水利局",
                                        "contactsUser":null,
                                        "contactsPhone":null
                                    },
                                    {
                                        "id":340,
                                        "parentId":228,
                                        "name":"经开区交通局",
                                        "contactsUser":null,
                                        "contactsPhone":null
                                    }
                                ]
                            },
                            {
                                "id":229,
                                "parentId":7,
                                "name":"高铁试验经济区根治办",
                                "contactsUser":null,
                                "contactsPhone":null,
                                "children":[
                                    {
                                        "id":20,
                                        "parentId":229,
                                        "name":"高铁试验经济区社会发展局",
                                        "contactsUser":null,
                                        "contactsPhone":null
                                    },
                                    {
                                        "id":341,
                                        "parentId":229,
                                        "name":"高铁试验经济区住建局",
                                        "contactsUser":null,
                                        "contactsPhone":null
                                    },
                                    {
                                        "id":342,
                                        "parentId":229,
                                        "name":"高铁试验经济区水利局",
                                        "contactsUser":null,
                                        "contactsPhone":null
                                    },
                                    {
                                        "id":343,
                                        "parentId":229,
                                        "name":"高铁试验经济区交通局",
                                        "contactsUser":null,
                                        "contactsPhone":null
                                    }
                                ]
                            }
                        ]
                    }
                ]
            }
        ],
        "errCode":0,
        "errMsg":null,
        "extend":null,
        "redirectUrl":null,
        "success":true,
        "total":0
    });
};

const genAppClient = (req: Request, res: Response) => {
    res.json({
        "data": {
            "id":1,
            "appKey":"4567898765",
          "appSecret":"xxxxxxxxxxxx"
        },
        "errCode": 0,
        "success": true,
        "total": 0
    });
};

const getAppClient = (req: Request, res: Response) => {
    res.json({
        "data": [
            {
            "id":1,
            "appKey":"4567898765",//只显示appkey
            "appSecret":"**********"//appSecret是加密的，前端显示********
            }
        ],
        "errCode": 0,
        "success": true,
        "total": 0
    });
};

const getConfig = (req: Request, res: Response) => {
    res.json({
        "data": [
            {
            "remark":"推送申请URL",
            "name":"order_apply",//名称
            "url":"http://******"//url地址,前端提示必须http或者https
            }
        ],
        "errCode": 0,
        "success": true,
        "total": 0
    });
};

const updateConfig = (req: Request, res: Response) => {
    res.json({
        "data": [
            {
            "remark":"推送申请URL",
            "name":"order_apply",//名称
            "url":"http://******"//url地址,前端提示必须http或者https
            }
        ],
        "errCode": 0,
        "success": true,
        "total": 0
    });
};


export default {
    'GET /oa/tag/tag_list': getRoleList,
    'GET /oa/tag/perms': tagPerms,
    'GET /oa/tag/search': searchUser,
    'POST /oa/tag/tag_remove': successRequest,
    'POST /oa/tag/tag_add': successRequest,
    'POST /oa/tag/tag_update': successRequest,
    'POST /oa/tag/set_user_tags': successRequest,
    'GET /oa/tag/searchDepartment': searchDepartment,
    
    'GET /bank/tag/search': searchUser,
    'GET /bank/tag/perms': tagPerms,
    'GET /bank/tag/tag_list': getRoleList,
    'POST /bank/tag/tag_remove': successRequest,
    'POST /bank/tag/tag_add': successRequest,
    'POST /bank/tag/tag_update': successRequest,
    'POST /bank/tag/set_user_tags': successRequest,
    'GET /bank/tag/searchDepartment': searchDepartment,

};

